home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the 3D Game Programming Gurus / gurus.iso / DirectX / dx9sdkcp.exe / SDK (C++) / Include / dvoice.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-12-04  |  34.0 KB  |  858 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1999 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:       dpvoice.h
  6.  *  Content:    DirectPlayVoice include file
  7.  ***************************************************************************/
  8.  
  9. #ifndef __DVOICE__
  10. #define __DVOICE__
  11.  
  12. #include <ole2.h>            // for DECLARE_INTERFACE and HRESULT
  13. #include <mmsystem.h>
  14. #include <mmreg.h>
  15. #include <msacm.h>
  16. #include "dsound.h"
  17.  
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21.  
  22.  
  23. /****************************************************************************
  24.  *
  25.  * DirectPlayVoice CLSIDs
  26.  *
  27.  ****************************************************************************/
  28.  
  29.  
  30. // {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D}
  31. DEFINE_GUID(CLSID_DirectPlayVoiceClient, 
  32. 0xb9f3eb85, 0xb781, 0x4ac1, 0x8d, 0x90, 0x93, 0xa0, 0x5e, 0xe3, 0x7d, 0x7d);
  33.  
  34. // {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3}
  35. DEFINE_GUID(CLSID_DirectPlayVoiceServer, 
  36. 0xd3f5b8e6, 0x9b78, 0x4a4c, 0x94, 0xea, 0xca, 0x23, 0x97, 0xb6, 0x63, 0xd3);
  37.  
  38. // {0F0F094B-B01C-4091-A14D-DD0CD807711A}
  39. DEFINE_GUID(CLSID_DirectPlayVoiceTest, 
  40. 0xf0f094b, 0xb01c, 0x4091, 0xa1, 0x4d, 0xdd, 0xc, 0xd8, 0x7, 0x71, 0x1a);
  41.  
  42. /****************************************************************************
  43.  *
  44.  * DirectPlayVoice Interface IIDs
  45.  *
  46.  ****************************************************************************/
  47.  
  48.  
  49. // {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306}
  50. DEFINE_GUID(IID_IDirectPlayVoiceClient, 
  51. 0x1dfdc8ea, 0xbcf7, 0x41d6, 0xb2, 0x95, 0xab, 0x64, 0xb3, 0xb2, 0x33, 0x6);
  52.  
  53. // {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9}
  54. DEFINE_GUID(IID_IDirectPlayVoiceServer, 
  55. 0xfaa1c173, 0x468, 0x43b6, 0x8a, 0x2a, 0xea, 0x8a, 0x4f, 0x20, 0x76, 0xc9);
  56.  
  57. // {D26AF734-208B-41da-8224-E0CE79810BE1}
  58. DEFINE_GUID(IID_IDirectPlayVoiceTest,
  59. 0xd26af734, 0x208b, 0x41da, 0x82, 0x24, 0xe0, 0xce, 0x79, 0x81, 0xb, 0xe1);
  60.  
  61. /****************************************************************************
  62.  *
  63.  * DirectPlayVoice Compression Type GUIDs
  64.  *
  65.  ****************************************************************************/
  66.  
  67. // MS-ADPCM 32.8 kbit/s
  68. //
  69. // {699B52C1-A885-46a8-A308-97172419ADC7}
  70. DEFINE_GUID(DPVCTGUID_ADPCM,
  71. 0x699b52c1, 0xa885, 0x46a8, 0xa3, 0x8, 0x97, 0x17, 0x24, 0x19, 0xad, 0xc7);
  72.  
  73. // Microsoft GSM 6.10 13 kbit/s
  74. //
  75. // {24768C60-5A0D-11d3-9BE4-525400D985E7}
  76. DEFINE_GUID(DPVCTGUID_GSM,
  77. 0x24768c60, 0x5a0d, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
  78.  
  79. // MS-PCM 64 kbit/s
  80. // 
  81. // {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5}
  82. DEFINE_GUID(DPVCTGUID_NONE,
  83. 0x8de12fd4, 0x7cb3, 0x48ce, 0xa7, 0xe8, 0x9c, 0x47, 0xa2, 0x2e, 0x8a, 0xc5);
  84.  
  85. // Voxware SC03 3.2kbit/s
  86. //
  87. // {7D82A29B-2242-4f82-8F39-5D1153DF3E41}
  88. DEFINE_GUID(DPVCTGUID_SC03,
  89. 0x7d82a29b, 0x2242, 0x4f82, 0x8f, 0x39, 0x5d, 0x11, 0x53, 0xdf, 0x3e, 0x41);
  90.  
  91. // Voxware SC06 6.4kbit/s
  92. //
  93. // {53DEF900-7168-4633-B47F-D143916A13C7}
  94. DEFINE_GUID(DPVCTGUID_SC06,
  95. 0x53def900, 0x7168, 0x4633, 0xb4, 0x7f, 0xd1, 0x43, 0x91, 0x6a, 0x13, 0xc7);
  96.  
  97. // TrueSpeech(TM) 8.6 kbit/s
  98. //
  99. // {D7954361-5A0B-11d3-9BE4-525400D985E7}
  100. DEFINE_GUID(DPVCTGUID_TRUESPEECH,
  101. 0xd7954361, 0x5a0b, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7);
  102.  
  103. // Voxware VR12 1.4kbit/s
  104. //
  105. // {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D}
  106. DEFINE_GUID(DPVCTGUID_VR12,
  107. 0xfe44a9fe, 0x8ed4, 0x48bf, 0x9d, 0x66, 0x1b, 0x1a, 0xdf, 0xf9, 0xff, 0x6d);
  108.  
  109. // Define the default compression type
  110. #define DPVCTGUID_DEFAULT    DPVCTGUID_SC03
  111.  
  112. /****************************************************************************
  113.  *
  114.  * DirectPlayVoice Interface Pointer definitions
  115.  *
  116.  ****************************************************************************/
  117.  
  118. typedef struct IDirectPlayVoiceClient FAR *LPDIRECTPLAYVOICECLIENT, *PDIRECTPLAYVOICECLIENT;
  119. typedef struct IDirectPlayVoiceServer FAR *LPDIRECTPLAYVOICESERVER, *PDIRECTPLAYVOICESERVER;
  120. typedef struct IDirectPlayVoiceTest FAR *LPDIRECTPLAYVOICETEST, *PDIRECTPLAYVOICETEST;
  121.  
  122. /****************************************************************************
  123.  *
  124.  * DirectPlayVoice Callback Functions
  125.  *
  126.  ****************************************************************************/
  127. typedef HRESULT (FAR PASCAL *PDVMESSAGEHANDLER)(
  128.     PVOID   pvUserContext,
  129.     DWORD   dwMessageType,
  130.     LPVOID  lpMessage
  131. );
  132.  
  133. typedef PDVMESSAGEHANDLER LPDVMESSAGEHANDLER;
  134.  
  135. /****************************************************************************
  136.  *
  137.  * DirectPlayVoice Datatypes (Non-Structure / Non-Message)
  138.  *
  139.  ****************************************************************************/
  140.  
  141. typedef DWORD DVID, *LPDVID, *PDVID;
  142.  
  143. /****************************************************************************
  144.  *
  145.  * DirectPlayVoice Message Types
  146.  *
  147.  ****************************************************************************/
  148.  
  149. #define DVMSGID_BASE                        0x0000
  150.  
  151. #define DVMSGID_MINBASE                     (DVMSGID_CREATEVOICEPLAYER)
  152. #define DVMSGID_CREATEVOICEPLAYER           (DVMSGID_BASE+0x0001)
  153. #define DVMSGID_DELETEVOICEPLAYER           (DVMSGID_BASE+0x0002)
  154. #define DVMSGID_SESSIONLOST                 (DVMSGID_BASE+0x0003)
  155. #define DVMSGID_PLAYERVOICESTART            (DVMSGID_BASE+0x0004)
  156. #define DVMSGID_PLAYERVOICESTOP             (DVMSGID_BASE+0x0005)
  157. #define DVMSGID_RECORDSTART                 (DVMSGID_BASE+0x0006)
  158. #define DVMSGID_RECORDSTOP                  (DVMSGID_BASE+0x0007)
  159. #define DVMSGID_CONNECTRESULT               (DVMSGID_BASE+0x0008)
  160. #define DVMSGID_DISCONNECTRESULT            (DVMSGID_BASE+0x0009)
  161. #define DVMSGID_INPUTLEVEL                  (DVMSGID_BASE+0x000A)
  162. #define DVMSGID_OUTPUTLEVEL                 (DVMSGID_BASE+0x000B)
  163. #define DVMSGID_HOSTMIGRATED                (DVMSGID_BASE+0x000C)
  164. #define DVMSGID_SETTARGETS                  (DVMSGID_BASE+0x000D)
  165. #define DVMSGID_PLAYEROUTPUTLEVEL           (DVMSGID_BASE+0x000E)
  166. #define DVMSGID_LOSTFOCUS                   (DVMSGID_BASE+0x0010)
  167. #define DVMSGID_GAINFOCUS                   (DVMSGID_BASE+0x0011)
  168. #define DVMSGID_LOCALHOSTSETUP                (DVMSGID_BASE+0x0012)
  169. #define DVMSGID_MAXBASE                     (DVMSGID_LOCALHOSTSETUP)
  170.  
  171. /****************************************************************************
  172.  *
  173.  * DirectPlayVoice Constants
  174.  *
  175.  ****************************************************************************/
  176.  
  177. //
  178. // Buffer Aggresiveness Value Ranges
  179. //
  180. #define DVBUFFERAGGRESSIVENESS_MIN          0x00000001
  181. #define DVBUFFERAGGRESSIVENESS_MAX          0x00000064
  182. #define DVBUFFERAGGRESSIVENESS_DEFAULT      0x00000000
  183.  
  184. // 
  185. // Buffer Quality Value Ranges
  186. //
  187. #define DVBUFFERQUALITY_MIN                 0x00000001
  188. #define DVBUFFERQUALITY_MAX                 0x00000064
  189. #define DVBUFFERQUALITY_DEFAULT             0x00000000
  190.  
  191. #define DVID_SYS                0
  192.  
  193. //
  194. // Used to identify the session host in client/server
  195. //
  196. #define DVID_SERVERPLAYER       1
  197.  
  198. //
  199. // Used to target all players
  200. //
  201. #define DVID_ALLPLAYERS         0
  202.  
  203. //
  204. // Used to identify the main buffer
  205. //
  206. #define DVID_REMAINING          0xFFFFFFFF
  207.  
  208. // 
  209. // Input level range
  210. //
  211. #define DVINPUTLEVEL_MIN                    0x00000000
  212. #define DVINPUTLEVEL_MAX                    0x00000063    // 99 decimal
  213.  
  214. #define DVNOTIFYPERIOD_MINPERIOD            20
  215.  
  216.  
  217. #define DVPLAYBACKVOLUME_DEFAULT            DSBVOLUME_MAX
  218.  
  219. #define DVRECORDVOLUME_LAST                 0x00000001
  220.  
  221.  
  222. //
  223. // Use the default value
  224. //
  225. #define DVTHRESHOLD_DEFAULT               0xFFFFFFFF
  226.  
  227. //
  228. // Threshold Ranges
  229. //
  230. #define DVTHRESHOLD_MIN                   0x00000000
  231. #define DVTHRESHOLD_MAX                   0x00000063    // 99 decimal
  232.  
  233. //
  234. // Threshold field is not used 
  235. //
  236. #define DVTHRESHOLD_UNUSED                0xFFFFFFFE
  237.  
  238. //
  239. // Session Types
  240. //
  241. #define DVSESSIONTYPE_PEER                  0x00000001
  242. #define DVSESSIONTYPE_MIXING                0x00000002
  243. #define DVSESSIONTYPE_FORWARDING            0x00000003
  244. #define DVSESSIONTYPE_ECHO                  0x00000004
  245.  
  246. /****************************************************************************
  247.  *
  248.  * DirectPlayVoice Flags
  249.  *
  250.  ****************************************************************************/
  251.  
  252.  
  253. // 
  254. // Enable automatic adjustment of the recording volume
  255. //
  256. #define DVCLIENTCONFIG_AUTORECORDVOLUME     0x00000008
  257.  
  258. //
  259. // Enable automatic voice activation
  260. //
  261. #define DVCLIENTCONFIG_AUTOVOICEACTIVATED   0x00000020
  262.  
  263. // 
  264. // Enable echo suppression
  265. //
  266. #define DVCLIENTCONFIG_ECHOSUPPRESSION      0x08000000
  267.  
  268. // 
  269. // Voice Activation manual mode
  270. //
  271. #define DVCLIENTCONFIG_MANUALVOICEACTIVATED 0x00000004
  272.  
  273. // 
  274. // Only playback voices that have buffers created for them
  275. //
  276. #define DVCLIENTCONFIG_MUTEGLOBAL           0x00000010
  277.  
  278. // 
  279. // Mute the playback
  280. //
  281. #define DVCLIENTCONFIG_PLAYBACKMUTE         0x00000002
  282.  
  283. //
  284. // Mute the recording 
  285. //
  286. #define DVCLIENTCONFIG_RECORDMUTE           0x00000001
  287.  
  288. // 
  289. // Complete the operation before returning
  290. //
  291. #define DVFLAGS_SYNC                        0x00000001
  292.  
  293. // 
  294. // Just check to see if wizard has been run, and if so what it's results were
  295. //
  296. #define DVFLAGS_QUERYONLY                   0x00000002
  297.  
  298. //
  299. // Shutdown the voice session without migrating the host
  300. //
  301. #define DVFLAGS_NOHOSTMIGRATE               0x00000008
  302.  
  303. // 
  304. // Allow the back button to be enabled in the wizard
  305. //
  306. #define DVFLAGS_ALLOWBACK                   0x00000010
  307.  
  308. //
  309. // Disable host migration in the voice session
  310. //
  311. #define DVSESSION_NOHOSTMIGRATION           0x00000001
  312.  
  313. // 
  314. // Server controlled targetting
  315. //
  316. #define DVSESSION_SERVERCONTROLTARGET       0x00000002
  317.  
  318. //
  319. // Use DirectSound Normal Mode instead of priority 
  320. //
  321. #define DVSOUNDCONFIG_NORMALMODE            0x00000001
  322.  
  323. //
  324. // Automatically select the microphone
  325. //
  326. #define DVSOUNDCONFIG_AUTOSELECT            0x00000002
  327.  
  328. // 
  329. // Run in half duplex mode
  330. //
  331. #define DVSOUNDCONFIG_HALFDUPLEX            0x00000004
  332.  
  333. // 
  334. // No volume controls are available for the recording device
  335. //
  336. #define DVSOUNDCONFIG_NORECVOLAVAILABLE     0x00000010
  337.  
  338. // 
  339. // Disable capture sharing
  340. //
  341. #define DVSOUNDCONFIG_NOFOCUS               0x20000000
  342.  
  343. // 
  344. // Set system conversion quality to high
  345. //
  346. #define DVSOUNDCONFIG_SETCONVERSIONQUALITY    0x00000008
  347.  
  348. //
  349. // Enable strict focus mode
  350. // 
  351. #define DVSOUNDCONFIG_STRICTFOCUS           0x40000000
  352.  
  353. //
  354. // Player is in half duplex mode
  355. //
  356. #define DVPLAYERCAPS_HALFDUPLEX             0x00000001
  357.  
  358. // 
  359. // Specifies that player is the local player
  360. //
  361. #define DVPLAYERCAPS_LOCAL                  0x00000002
  362.  
  363. /****************************************************************************
  364.  *
  365.  * DirectPlayVoice Structures (Non-Message)
  366.  *
  367.  ****************************************************************************/
  368.  
  369.  
  370. //
  371. // DirectPlayVoice Caps
  372. // (GetCaps / SetCaps)
  373. //
  374. typedef struct
  375. {
  376.     DWORD   dwSize;                 // Size of this structure
  377.     DWORD   dwFlags;                // Caps flags
  378. } DVCAPS, *LPDVCAPS, *PDVCAPS;
  379.  
  380. //
  381. // DirectPlayVoice Client Configuration
  382. // (Connect / GetClientConfig)
  383. //
  384. typedef struct
  385. {
  386.     DWORD   dwSize;                 // Size of this structure
  387.     DWORD   dwFlags;                // Flags for client config (DVCLIENTCONFIG_...)
  388.     LONG    lRecordVolume;          // Recording volume 
  389.     LONG    lPlaybackVolume;        // Playback volume
  390.     DWORD   dwThreshold;          // Voice Activation Threshold
  391.     DWORD   dwBufferQuality;        // Buffer quality
  392.     DWORD   dwBufferAggressiveness; // Buffer aggressiveness
  393.     DWORD   dwNotifyPeriod;         // Period of notification messages (ms)
  394. } DVCLIENTCONFIG, *LPDVCLIENTCONFIG, *PDVCLIENTCONFIG;
  395.  
  396. //
  397. // DirectPlayVoice Compression Type Information
  398. // (GetCompressionTypes)
  399. //
  400. typedef struct
  401. {
  402.     DWORD   dwSize;                 // Size of this structure
  403.     GUID    guidType;               // GUID that identifies this compression type
  404.     LPWSTR  lpszName;               // String name of this compression type
  405.     LPWSTR  lpszDescription;        // Description for this compression type
  406.     DWORD   dwFlags;                // Flags for this compression type
  407.     DWORD   dwMaxBitsPerSecond;        // Maximum # of bit/s this compression type uses
  408. } DVCOMPRESSIONINFO, *LPDVCOMPRESSIONINFO, *PDVCOMPRESSIONINFO;
  409.  
  410. //
  411. // DirectPlayVoice Session Description
  412. // (Host / GetSessionDesc)
  413. //
  414. typedef struct
  415. {
  416.     DWORD   dwSize;                 // Size of this structure
  417.     DWORD   dwFlags;                // Session flags (DVSESSION_...)
  418.     DWORD   dwSessionType;          // Session type (DVSESSIONTYPE_...)
  419.     GUID    guidCT;                 // Compression Type to use
  420.     DWORD   dwBufferQuality;        // Buffer quality
  421.     DWORD   dwBufferAggressiveness; // Buffer aggresiveness
  422. } DVSESSIONDESC, *LPDVSESSIONDESC, *PDVSESSIONDESC;
  423.  
  424. // 
  425. // DirectPlayVoice Client Sound Device Configuration
  426. // (Connect / GetSoundDeviceConfig)
  427. //
  428. typedef struct
  429. {
  430.     DWORD                   dwSize;                 // Size of this structure
  431.     DWORD                   dwFlags;                // Flags for sound config (DVSOUNDCONFIG_...)
  432.     GUID                    guidPlaybackDevice;     // GUID of the playback device to use
  433.     LPDIRECTSOUND           lpdsPlaybackDevice;     // DirectSound Object to use (optional)
  434.     GUID                    guidCaptureDevice;      // GUID of the capture device to use
  435.     LPDIRECTSOUNDCAPTURE    lpdsCaptureDevice;      // DirectSoundCapture Object to use (optional)
  436.     HWND                    hwndAppWindow;          // HWND of your application's top-level window
  437.     LPDIRECTSOUNDBUFFER     lpdsMainBuffer;         // DirectSoundBuffer to use for playback (optional)
  438.     DWORD                   dwMainBufferFlags;      // Flags to pass to Play() on the main buffer
  439.     DWORD                   dwMainBufferPriority;   // Priority to set when calling Play() on the main buffer
  440. } DVSOUNDDEVICECONFIG, *LPDVSOUNDDEVICECONFIG, *PDVSOUNDDEVICECONFIG;
  441.  
  442. /****************************************************************************
  443.  *
  444.  * DirectPlayVoice message handler call back structures
  445.  *
  446.  ****************************************************************************/
  447.  
  448. //
  449. // Result of the Connect() call.  (If it wasn't called Async)
  450. // (DVMSGID_CONNECTRESULT)
  451. //
  452. typedef struct
  453. {
  454.     DWORD   dwSize;                         // Size of this structure
  455.     HRESULT hrResult;                       // Result of the Connect() call
  456. } DVMSG_CONNECTRESULT, *LPDVMSG_CONNECTRESULT, *PDVMSG_CONNECTRESULT;
  457.  
  458. //
  459. // A new player has entered the voice session
  460. // (DVMSGID_CREATEVOICEPLAYER)
  461. // 
  462. typedef struct
  463. {
  464.     DWORD   dwSize;                         // Size of this structure
  465.     DVID    dvidPlayer;                     // DVID of the player who joined
  466.     DWORD   dwFlags;                        // Player flags (DVPLAYERCAPS_...)
  467.     PVOID    pvPlayerContext;                // Context value for this player (user set)
  468. } DVMSG_CREATEVOICEPLAYER, *LPDVMSG_CREATEVOICEPLAYER, *PDVMSG_CREATEVOICEPLAYER;
  469.  
  470. //
  471. // A player has left the voice session
  472. // (DVMSGID_DELETEVOICEPLAYER)
  473. //
  474. typedef struct
  475. {
  476.     DWORD   dwSize;                         // Size of this structure
  477.     DVID    dvidPlayer;                     // DVID of the player who left
  478.     PVOID    pvPlayerContext;                // Context value for the player
  479. } DVMSG_DELETEVOICEPLAYER, *LPDVMSG_DELETEVOICEPLAYER, *PDVMSG_DELETEVOICEPLAYER;
  480.  
  481. //
  482. // Result of the Disconnect() call.  (If it wasn't called Async)
  483. // (DVMSGID_DISCONNECTRESULT)
  484. //
  485. typedef struct
  486. {
  487.     DWORD   dwSize;                         // Size of this structure
  488.     HRESULT hrResult;                       // Result of the Disconnect() call
  489. } DVMSG_DISCONNECTRESULT, *LPDVMSG_DISCONNECTRESULT, *PDVMSG_DISCONNECTRESULT;
  490.  
  491. // 
  492. // The voice session host has migrated.
  493. // (DVMSGID_HOSTMIGRATED) 
  494. //
  495. typedef struct
  496. {
  497.     DWORD                   dwSize;         // Size of this structure
  498.     DVID                    dvidNewHostID;  // DVID of the player who is now the host
  499.     LPDIRECTPLAYVOICESERVER pdvServerInterface;
  500.                                             // Pointer to the new host object (if local player is now host)
  501. } DVMSG_HOSTMIGRATED, *LPDVMSG_HOSTMIGRATED, *PDVMSG_HOSTMIGRATED;
  502.  
  503. //
  504. // The current input level / recording volume on the local machine
  505. // (DVMSGID_INPUTLEVEL)
  506. //
  507. typedef struct
  508. {
  509.     DWORD   dwSize;                         // Size of this structure
  510.     DWORD   dwPeakLevel;                    // Current peak level of the audio
  511.     LONG    lRecordVolume;                  // Current recording volume
  512.     PVOID    pvLocalPlayerContext;           // Context value for the local player
  513. } DVMSG_INPUTLEVEL, *LPDVMSG_INPUTLEVEL, *PDVMSG_INPUTLEVEL;
  514.  
  515. //
  516. // The local client is about to become the new host
  517. // (DVMSGID_LOCALHOSTSETUP)
  518. //
  519. typedef struct
  520. {
  521.     DWORD                dwSize;             // Size of this structure
  522.     PVOID                pvContext;            // Context value to be passed to Initialize() of new host object
  523.     PDVMESSAGEHANDLER    pMessageHandler;    // Message handler to be used by new host object
  524. } DVMSG_LOCALHOSTSETUP, *LPDVMSG_LOCALHOSTSETUP, *PDVMSG_LOCALHOSTSETUP;
  525.  
  526. //
  527. // The current output level for the combined output of all incoming streams.
  528. // (DVMSGID_OUTPUTLEVEL)
  529. //
  530. typedef struct
  531. {
  532.     DWORD   dwSize;                         // Size of this structure
  533.     DWORD   dwPeakLevel;                    // Current peak level of the output
  534.     LONG    lOutputVolume;                  // Current playback volume
  535.     PVOID    pvLocalPlayerContext;           // Context value for the local player
  536. } DVMSG_OUTPUTLEVEL, *LPDVMSG_OUTPUTLEVEL, *PDVMSG_OUTPUTLEVEL;
  537.  
  538. //
  539. // The current peak level of an individual player's incoming audio stream as it is
  540. // being played back.
  541. // (DVMSGID_PLAYEROUTPUTLEVEL)
  542. //
  543. typedef struct
  544. {
  545.     DWORD   dwSize;                         // Size of this structure
  546.     DVID    dvidSourcePlayerID;                   // DVID of the player
  547.     DWORD   dwPeakLevel;                    // Peak level of the player's stream
  548.     PVOID    pvPlayerContext;                // Context value for the player
  549. } DVMSG_PLAYEROUTPUTLEVEL, *LPDVMSG_PLAYEROUTPUTLEVEL, *PDVMSG_PLAYEROUTPUTLEVEL;
  550.  
  551. // 
  552. // An audio stream from the specified player has started playing back on the local client.
  553. // (DVMSGID_PLAYERVOICESTART).
  554. //
  555. typedef struct
  556. {
  557.     DWORD   dwSize;                         // Size of this structure
  558.     DVID    dvidSourcePlayerID;             // DVID of the Player 
  559.     PVOID    pvPlayerContext;                // Context value for this player
  560. } DVMSG_PLAYERVOICESTART, *LPDVMSG_PLAYERVOICESTART, *PDVMSG_PLAYERVOICESTART;
  561.  
  562. //
  563. // The audio stream from the specified player has stopped playing back on the local client.
  564. // (DVMSGID_PLAYERVOICESTOP)
  565. //
  566. typedef struct
  567. {
  568.     DWORD   dwSize;                         // Size of this structure
  569.     DVID    dvidSourcePlayerID;             // DVID of the player
  570.     PVOID    pvPlayerContext;                // Context value for this player
  571. } DVMSG_PLAYERVOICESTOP, *LPDVMSG_PLAYERVOICESTOP, *PDVMSG_PLAYERVOICESTOP;
  572.  
  573. // 
  574. // Transmission has started on the local machine
  575. // (DVMSGID_RECORDSTART)
  576. //
  577. typedef struct
  578. {
  579.     DWORD   dwSize;                         // Size of this structure
  580.     DWORD   dwPeakLevel;                    // Peak level that caused transmission to start
  581.     PVOID    pvLocalPlayerContext;           // Context value for the local player
  582. } DVMSG_RECORDSTART, *LPDVMSG_RECORDSTART, *PDVMSG_RECORDSTART;
  583.  
  584. // 
  585. // Transmission has stopped on the local machine
  586. // (DVMSGID_RECORDSTOP)
  587. // 
  588. typedef struct
  589. {
  590.     DWORD   dwSize;                         // Size of this structure
  591.     DWORD   dwPeakLevel;                    // Peak level that caused transmission to stop
  592.     PVOID    pvLocalPlayerContext;           // Context value for the local player
  593. } DVMSG_RECORDSTOP, *LPDVMSG_RECORDSTOP, *PDVMSG_RECORDSTOP;
  594.  
  595. // 
  596. // The voice session has been lost
  597. // (DVMSGID_SESSIONLOST)
  598. //
  599. typedef struct
  600. {
  601.     DWORD   dwSize;                         // Size of this structure
  602.     HRESULT hrResult;                        // Reason the session was disconnected
  603. } DVMSG_SESSIONLOST, *LPDVMSG_SESSIONLOST, *PDVMSG_SESSIONLOST;
  604.  
  605. //
  606. // The target list has been updated for the local client
  607. // (DVMSGID_SETTARGETS)
  608. //
  609. typedef struct
  610. {
  611.     DWORD   dwSize;                         // Size of this structure
  612.     DWORD   dwNumTargets;                   // # of targets 
  613.     PDVID   pdvidTargets;                   // An array of DVIDs specifying the current targets
  614. } DVMSG_SETTARGETS, *LPDVMSG_SETTARGETS, *PDVMSG_SETTARGETS;
  615.  
  616.  
  617. /****************************************************************************
  618.  *
  619.  * DirectPlayVoice Functions
  620.  *
  621.  ****************************************************************************/
  622.  
  623. /*
  624.  * 
  625.  * This function is no longer supported.  It is recommended that CoCreateInstance be used to create 
  626.  * DirectPlay voice objects.  
  627.  *
  628.  * extern HRESULT WINAPI DirectPlayVoiceCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown); 
  629.  *
  630.  */
  631.  
  632. /****************************************************************************
  633.  *
  634.  * DirectPlay8 Application Interfaces
  635.  *
  636.  ****************************************************************************/
  637.  
  638. #undef INTERFACE
  639. #define INTERFACE IDirectPlayVoiceClient
  640. DECLARE_INTERFACE_( IDirectPlayVoiceClient, IUnknown )
  641. {
  642.     /*** IUnknown methods ***/
  643.     STDMETHOD(QueryInterface)(THIS_ REFIID riid, PVOID *ppvObj) PURE;
  644.     STDMETHOD_(ULONG,AddRef)(THIS) PURE;
  645.     STDMETHOD_(ULONG,Release)(THIS) PURE;
  646.     /*** IDirectPlayVoiceClient methods ***/
  647.     STDMETHOD_(HRESULT, Initialize)   (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, PDWORD, DWORD ) PURE;
  648.     STDMETHOD_(HRESULT, Connect)      (THIS_ PDVSOUNDDEVICECONFIG, PDVCLIENTCONFIG, DWORD ) PURE;
  649.     STDMETHOD_(HRESULT, Disconnect)   (THIS_ DWORD ) PURE;
  650.     STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
  651.     STDMETHOD_(HRESULT, GetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
  652.     STDMETHOD_(HRESULT, SetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE;
  653.     STDMETHOD_(HRESULT, GetCaps)         (THIS_ PDVCAPS ) PURE;
  654.     STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
  655.     STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ PDVID, DWORD, DWORD ) PURE;
  656.     STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ PDVID, PDWORD, DWORD ) PURE;
  657.     STDMETHOD_(HRESULT, Create3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUNDBUFFER, DWORD, DWORD, LPDIRECTSOUND3DBUFFER * ) PURE;
  658.     STDMETHOD_(HRESULT, Delete3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUND3DBUFFER * ) PURE;
  659.     STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
  660.     STDMETHOD_(HRESULT, GetSoundDeviceConfig)( THIS_ PDVSOUNDDEVICECONFIG, PDWORD ) PURE;
  661. };
  662.  
  663.  
  664. #undef INTERFACE
  665. #define INTERFACE IDirectPlayVoiceServer
  666. DECLARE_INTERFACE_( IDirectPlayVoiceServer, IUnknown )
  667. {
  668.     /*** IUnknown methods ***/
  669.     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, LPVOID * ppvObj) PURE;
  670.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  671.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  672.     /*** IDirectPlayVoiceServer methods ***/
  673.     STDMETHOD_(HRESULT, Initialize)   (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, LPDWORD, DWORD ) PURE;
  674.     STDMETHOD_(HRESULT, StartSession)  (THIS_ PDVSESSIONDESC, DWORD ) PURE;
  675.     STDMETHOD_(HRESULT, StopSession)   (THIS_ DWORD ) PURE;
  676.     STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
  677.     STDMETHOD_(HRESULT, SetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE;
  678.     STDMETHOD_(HRESULT, GetCaps)         (THIS_ PDVCAPS ) PURE;
  679.     STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE;
  680.     STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ DVID, PDVID, DWORD, DWORD ) PURE;
  681.     STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ DVID, PDVID, PDWORD, DWORD ) PURE;
  682.     STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE;
  683. };
  684.  
  685. #undef INTERFACE
  686. #define INTERFACE IDirectPlayVoiceTest
  687. DECLARE_INTERFACE_( IDirectPlayVoiceTest, IUnknown )
  688. {
  689.     /*** IUnknown methods ***/
  690.     STDMETHOD(QueryInterface)       (THIS_ REFIID riid, PVOID * ppvObj) PURE;
  691.     STDMETHOD_(ULONG,AddRef)        (THIS) PURE;
  692.     STDMETHOD_(ULONG,Release)       (THIS) PURE;
  693.     /*** IDirectPlayVoiceTest methods ***/
  694.     STDMETHOD_(HRESULT, CheckAudioSetup) (THIS_ const GUID *,  const GUID * , HWND, DWORD ) PURE;
  695. };
  696.  
  697. #if !defined(__cplusplus) || defined(CINTERFACE)
  698.  
  699. #define IDirectPlayVoiceClient_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  700. #define IDirectPlayVoiceClient_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  701. #define IDirectPlayVoiceClient_Release(p)                   (p)->lpVtbl->Release(p)
  702.  
  703. #define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e)      (p)->lpVtbl->Initialize(p,a,b,c,d,e)
  704. #define IDirectPlayVoiceClient_Connect(p,a,b,c)             (p)->lpVtbl->Connect(p,a,b,c)
  705. #define IDirectPlayVoiceClient_Disconnect(p,a)              (p)->lpVtbl->Disconnect(p,a)
  706. #define IDirectPlayVoiceClient_GetSessionDesc(p,a)          (p)->lpVtbl->GetSessionDesc(p,a)
  707. #define IDirectPlayVoiceClient_GetClientConfig(p,a)         (p)->lpVtbl->GetClientConfig(p,a)
  708. #define IDirectPlayVoiceClient_SetClientConfig(p,a)         (p)->lpVtbl->SetClientConfig(p,a)
  709. #define IDirectPlayVoiceClient_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
  710. #define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
  711. #define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c)  (p)->lpVtbl->SetTransmitTargets(p,a,b,c)
  712. #define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c)  (p)->lpVtbl->GetTransmitTargets(p,a,b,c)
  713. #define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e)   (p)->lpVtbl->Create3DSoundBuffer(p,a,b,c,d,e)
  714. #define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b)   (p)->lpVtbl->Delete3DSoundBuffer(p,a,b)
  715. #define IDirectPlayVoiceClient_SetNotifyMask(p,a,b)         (p)->lpVtbl->SetNotifyMask(p,a,b)
  716. #define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b)  (p)->lpVtbl->GetSoundDeviceConfig(p,a,b)
  717.  
  718. #define IDirectPlayVoiceServer_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  719. #define IDirectPlayVoiceServer_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  720. #define IDirectPlayVoiceServer_Release(p)                   (p)->lpVtbl->Release(p)
  721.  
  722. #define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e)      (p)->lpVtbl->Initialize(p,a,b,c,d,e)
  723. #define IDirectPlayVoiceServer_StartSession(p,a,b)          (p)->lpVtbl->StartSession(p,a,b)
  724. #define IDirectPlayVoiceServer_StopSession(p,a)             (p)->lpVtbl->StopSession(p,a)
  725. #define IDirectPlayVoiceServer_GetSessionDesc(p,a)          (p)->lpVtbl->GetSessionDesc(p,a)
  726. #define IDirectPlayVoiceServer_SetSessionDesc(p,a)          (p)->lpVtbl->SetSessionDesc(p,a)
  727. #define IDirectPlayVoiceServer_GetCaps(p,a)                 (p)->lpVtbl->GetCaps(p,a)
  728. #define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d)
  729. #define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d)    (p)->lpVtbl->SetTransmitTargets(p,a,b,c,d)
  730. #define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d)    (p)->lpVtbl->GetTransmitTargets(p,a,b,c,d)
  731. #define IDirectPlayVoiceServer_SetNotifyMask(p,a,b)         (p)->lpVtbl->SetNotifyMask(p,a,b)
  732. #define IDirectPlayVoiceTest_QueryInterface(p,a,b)          (p)->lpVtbl->QueryInterface(p,a,b)
  733. #define IDirectPlayVoiceTest_AddRef(p)                      (p)->lpVtbl->AddRef(p)
  734. #define IDirectPlayVoiceTest_Release(p)                        (p)->lpVtbl->Release(p)
  735. #define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d)     (p)->lpVtbl->CheckAudioSetup(p,a,b,c,d)
  736.  
  737.  
  738. #else /* C++ */
  739.  
  740. #define IDirectPlayVoiceClient_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  741. #define IDirectPlayVoiceClient_AddRef(p)                    (p)->AddRef()
  742. #define IDirectPlayVoiceClient_Release(p)                   (p)->Release()
  743.  
  744. #define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e)      (p)->Initialize(a,b,c,d,e)
  745. #define IDirectPlayVoiceClient_Connect(p,a,b,c)             (p)->Connect(a,b,c)
  746. #define IDirectPlayVoiceClient_Disconnect(p,a)              (p)->Disconnect(a)
  747. #define IDirectPlayVoiceClient_GetSessionDesc(p,a)          (p)->GetSessionDesc(a)
  748. #define IDirectPlayVoiceClient_GetClientConfig(p,a)         (p)->GetClientConfig(a)
  749. #define IDirectPlayVoiceClient_SetClientConfig(p,a)         (p)->SetClientConfig(a)
  750. #define IDirectPlayVoiceClient_GetCaps(p,a)                 (p)->GetCaps(a)
  751. #define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
  752. #define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c)  (p)->SetTransmitTargets(a,b,c)
  753. #define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c)  (p)->GetTransmitTargets(a,b,c)
  754. #define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e)   (p)->Create3DSoundBuffer(a,b,c,d,e)
  755. #define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b)   (p)->Delete3DSoundBuffer(a,b)
  756. #define IDirectPlayVoiceClient_SetNotifyMask(p,a,b)         (p)->SetNotifyMask(a,b)
  757. #define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b)    (p)->GetSoundDeviceConfig(a,b)
  758.  
  759. #define IDirectPlayVoiceServer_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  760. #define IDirectPlayVoiceServer_AddRef(p)                    (p)->AddRef()
  761. #define IDirectPlayVoiceServer_Release(p)                   (p)->Release()
  762.  
  763. #define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e)      (p)->Initialize(a,b,c,d,e)
  764. #define IDirectPlayVoiceServer_StartSession(p,a,b)          (p)->StartSession(a,b)
  765. #define IDirectPlayVoiceServer_StopSession(p,a)             (p)->StopSession(a)
  766. #define IDirectPlayVoiceServer_GetSessionDesc(p,a)            (p)->GetSessionDesc(a)
  767. #define IDirectPlayVoiceServer_SetSessionDesc(p,a)            (p)->SetSessionDesc(a)
  768. #define IDirectPlayVoiceServer_GetCaps(p,a)                 (p)->GetCaps(a)
  769. #define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d)
  770. #define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->SetTransmitTargets(a,b,c,d)
  771. #define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->GetTransmitTargets(a,b,c,d)
  772. #define IDirectPlayVoiceServer_SetNotifyMask(p,a,b)         (p)->SetNotifyMask(a,b)
  773.  
  774. #define IDirectPlayVoiceTest_QueryInterface(p,a,b)          (p)->QueryInterface(a,b)
  775. #define IDirectPlayVoiceTest_AddRef(p)                      (p)->AddRef()
  776. #define IDirectPlayVoiceTest_Release(p)                     (p)->Release()
  777. #define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d)     (p)->CheckAudioSetup(a,b,c,d)
  778.  
  779.  
  780. #endif
  781.  
  782.  
  783. /****************************************************************************
  784.  *
  785.  * DIRECTPLAYVOICE ERRORS
  786.  *
  787.  * Errors are represented by negative values and cannot be combined.
  788.  *
  789.  ****************************************************************************/
  790.  
  791. #define _FACDPV  0x15
  792. #define MAKE_DVHRESULT( code )          MAKE_HRESULT( 1, _FACDPV, code )
  793.  
  794. #define DV_OK                           S_OK
  795. #define DV_FULLDUPLEX                   MAKE_HRESULT( 0, _FACDPV,  0x0005 )
  796. #define DV_HALFDUPLEX                   MAKE_HRESULT( 0, _FACDPV,  0x000A )
  797. #define DV_PENDING                        MAKE_HRESULT( 0, _FACDPV,  0x0010 )
  798.  
  799. #define DVERR_BUFFERTOOSMALL            MAKE_DVHRESULT(  0x001E )
  800. #define DVERR_EXCEPTION                 MAKE_DVHRESULT(  0x004A )
  801. #define DVERR_GENERIC                   E_FAIL
  802. #define DVERR_INVALIDFLAGS              MAKE_DVHRESULT( 0x0078 )
  803. #define DVERR_INVALIDOBJECT             MAKE_DVHRESULT( 0x0082 )
  804. #define DVERR_INVALIDPARAM              E_INVALIDARG
  805. #define DVERR_INVALIDPLAYER             MAKE_DVHRESULT( 0x0087 )
  806. #define DVERR_INVALIDGROUP              MAKE_DVHRESULT( 0x0091 )
  807. #define DVERR_INVALIDHANDLE             MAKE_DVHRESULT( 0x0096 )
  808. #define DVERR_OUTOFMEMORY               E_OUTOFMEMORY
  809. #define DVERR_PENDING                   DV_PENDING
  810. #define DVERR_NOTSUPPORTED              E_NOTIMPL
  811. #define DVERR_NOINTERFACE               E_NOINTERFACE
  812. #define DVERR_SESSIONLOST               MAKE_DVHRESULT( 0x012C )
  813. #define DVERR_NOVOICESESSION            MAKE_DVHRESULT( 0x012E )
  814. #define DVERR_CONNECTIONLOST            MAKE_DVHRESULT( 0x0168 )
  815. #define DVERR_NOTINITIALIZED            MAKE_DVHRESULT( 0x0169 )
  816. #define DVERR_CONNECTED                 MAKE_DVHRESULT( 0x016A )
  817. #define DVERR_NOTCONNECTED              MAKE_DVHRESULT( 0x016B )
  818. #define DVERR_CONNECTABORTING           MAKE_DVHRESULT( 0x016E )
  819. #define DVERR_NOTALLOWED                MAKE_DVHRESULT( 0x016F )
  820. #define DVERR_INVALIDTARGET             MAKE_DVHRESULT( 0x0170 )
  821. #define DVERR_TRANSPORTNOTHOST          MAKE_DVHRESULT( 0x0171 )
  822. #define DVERR_COMPRESSIONNOTSUPPORTED   MAKE_DVHRESULT( 0x0172 )
  823. #define DVERR_ALREADYPENDING            MAKE_DVHRESULT( 0x0173 )
  824. #define DVERR_SOUNDINITFAILURE          MAKE_DVHRESULT( 0x0174 )
  825. #define DVERR_TIMEOUT                   MAKE_DVHRESULT( 0x0175 )
  826. #define DVERR_CONNECTABORTED            MAKE_DVHRESULT( 0x0176 )
  827. #define DVERR_NO3DSOUND                 MAKE_DVHRESULT( 0x0177 )
  828. #define DVERR_ALREADYBUFFERED            MAKE_DVHRESULT( 0x0178 )
  829. #define DVERR_NOTBUFFERED               MAKE_DVHRESULT( 0x0179 )
  830. #define DVERR_HOSTING                   MAKE_DVHRESULT( 0x017A )
  831. #define DVERR_NOTHOSTING                MAKE_DVHRESULT( 0x017B )
  832. #define DVERR_INVALIDDEVICE             MAKE_DVHRESULT( 0x017C )
  833. #define DVERR_RECORDSYSTEMERROR         MAKE_DVHRESULT( 0x017D )
  834. #define DVERR_PLAYBACKSYSTEMERROR       MAKE_DVHRESULT( 0x017E )
  835. #define DVERR_SENDERROR                 MAKE_DVHRESULT( 0x017F )
  836. #define DVERR_USERCANCEL                MAKE_DVHRESULT( 0x0180 )
  837. #define DVERR_RUNSETUP                  MAKE_DVHRESULT( 0x0183 )
  838. #define DVERR_INCOMPATIBLEVERSION       MAKE_DVHRESULT( 0x0184 )
  839. #define DVERR_INITIALIZED               MAKE_DVHRESULT( 0x0187 )
  840. #define DVERR_INVALIDPOINTER            E_POINTER
  841. #define DVERR_NOTRANSPORT               MAKE_DVHRESULT( 0x0188 )
  842. #define DVERR_NOCALLBACK                MAKE_DVHRESULT( 0x0189 )
  843. #define DVERR_TRANSPORTNOTINIT          MAKE_DVHRESULT( 0x018A )
  844. #define DVERR_TRANSPORTNOSESSION        MAKE_DVHRESULT( 0x018B )
  845. #define DVERR_TRANSPORTNOPLAYER         MAKE_DVHRESULT( 0x018C )
  846. #define DVERR_USERBACK                  MAKE_DVHRESULT( 0x018D )
  847. #define DVERR_NORECVOLAVAILABLE         MAKE_DVHRESULT( 0x018E )
  848. #define DVERR_INVALIDBUFFER                MAKE_DVHRESULT( 0x018F )
  849. #define DVERR_LOCKEDBUFFER                MAKE_DVHRESULT( 0x0190 )
  850.  
  851. #ifdef __cplusplus
  852. }
  853. #endif
  854.  
  855. #endif
  856.  
  857.  
  858.